package com.nidu.demo.file.dto;

import com.nidu.demo.base.BaseCmd;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * 文件配置创建命令
 *
 * @author auto
 */
@Data
@Schema(description = "文件配置创建命令")
@EqualsAndHashCode(callSuper = true)
public class FileConfigAddCmd extends BaseCmd {

    @NotBlank(message = "配置名不能为空")
    @Schema(description = "配置名", requiredMode = Schema.RequiredMode.REQUIRED, example = "阿里云OSS配置")
    private String name;

    @NotNull(message = "存储器类型不能为空")
    @Schema(description = "存储器类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer storage;

    @Schema(description = "备注", example = "用于存储用户头像")
    private String remark;

    @Schema(description = "是否为主配置", example = "false")
    private Boolean master = false;

    @NotNull(message = "存储配置参数不能为空")
    @Schema(description = "存储配置参数", requiredMode = Schema.RequiredMode.REQUIRED)
    private Map<String, Object> config;
}